<?php
	session_start();
	
	if( $_SESSION['account_type_code'] != 1 && $_SESSION['account_type_code'] != 2) 
	{
		header("Location:index.php?response_msg=Please login.");
		exit;
	}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>SAILOR</title>
</head>

<body>
	<h1>WELCOME SAILOR : <?php echo htmlspecialchars($_SESSION['name']) ; ?></h1>
	
	<a href="signout.php">(Signout)</a>
	
	<h2 style="color:red">
		<?php
			if($_REQUEST['response_msg']) 
			{
				echo htmlspecialchars($_REQUEST['response_msg']);
				$_REQUEST['response_msg'] = '';
			}
		?>
	</h2>
	
	<hr/>
	<a href="search_boat.php">
		<h2>Search for a boat</h2>
	</a>	
	<hr/>
	
	<hr/>
	<a href="reservations.php">
		<h2>Manage reservations</h2>
	</a>	
	<hr/>
	
</body>
</html>